/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.rie06.openvoip.client.IHM.communication;

import com.rie06.openvoip.client.Contact;
import java.awt.Dimension;
import java.awt.GridLayout;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 *
 * @author clement
 */
public class PanelAddListContactConversationExtended extends JPanel {

    private CommunicationController communicationController;
    private PanelAddListContactConversation parent;
    private Contact contact;
    private JButton buttonAddContactConversation;
    private JLabel labelNom;

    PanelAddListContactConversationExtended(CommunicationController communicationController, PanelAddListContactConversation parent, Contact contact) {
        this.parent = parent;
        this.communicationController = communicationController;
        this.contact = contact;

        GridLayout stylePanel = new GridLayout(0, 2);
        this.setLayout(stylePanel);
        this.setPreferredSize(new Dimension(250, 50));

        String nom = contact.getName();
        labelNom = new JLabel("  " + nom);

        buttonAddContactConversation = new JButton("Ajouter");
        buttonAddContactConversation.setPreferredSize(new Dimension(5, 5));
        buttonAddContactConversation.addActionListener(communicationController);
        buttonAddContactConversation.setActionCommand("buttonAddContactConversation");

        this.add(labelNom);
        this.add(buttonAddContactConversation);
    }

    public Contact getContact() {
        return contact;
    }
}
